using System;
using System.Windows.Forms;


namespace Mimoza.GUI
{
    public enum WizardMode
    {
        Wizard,
        PropertySheet,
        Dialog
    }

    public enum WizardPageLeavingDirection
    { 
        Back,
        Forward,
        Change
    }

	public delegate void ButtonClick();
    public delegate void PageEvent(object page);

	public interface IWizard
	{
        void Init(WizardMode mode);

        object UserData { get; set; }
        IWizardPage CurrentPage { get; set; }

        WizardMode Mode { get; }
        void NextPage();
        void PrevPage();
        DialogResult Start();

        void AddPage(IWizardPage page);
        void DeletePagesFrom(int pageIndexFrom);

        void OnPrevPage();
        void OnNextPage();
        void OnFinish();
        void OnCancel();
	}

    public interface IWizardPage
    {
        void Init(IWizard wizard);

        void EnterPage();
        bool Try2LeavePage(WizardPageLeavingDirection direction);
 
        IWizard Wizard { get; }

        string PageName { get; }
        string PageTitle { get; }
        bool IsConfigured { get; set; }

        event PageEvent OnPageModified;
    }
}
